<template>
  <div class="app-container">
    <!--搜索栏 开始-->
    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
      <el-form-item label="手机号" prop="username">
        <el-input
          v-model="queryParams.username"
          placeholder="请输入手机号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">刷新</el-button>
      </el-form-item>
    </el-form>
    <!--搜索栏 结束-->

    <!--操作栏 开始-->
    <el-row :gutter="10" class="mb8">
      <!--      <el-col :span="1.5">
              <el-button
                type="primary"
                icon="el-icon-plus"
                size="mini"
                @click="handleAdd"
                v-hasPermi="['system:post:add']"
              >新增
              </el-button>
            </el-col>-->
      <!--<el-col :span="1.5">
        <el-button
          type="success"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['system:post:edit']"
        >修改
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:post:remove']"
        >删除
        </el-button>
      </el-col>-->
    </el-row>
    <!--操作栏 结束-->
    <!--
     <el-table  v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
     <el-table-column  type="selection" width="55" align="center">
     -->

    <el-table v-loading="loading" :data="tableData"  tooltip-effect="light">
      <el-table-column type="expand">
        <template slot-scope="props">
          <div style="margin-left: 20px; height: 200px; overflow-y:scroll;">
            <div>
              <span style="font-weight: bold">用户id:</span>
              <span style="margin-left: 8px">{{ props.row.username }}</span>
            </div>
            <div>
              <span style="font-weight: bold">昵称:</span>
              <span style="margin-left: 8px">{{ props.row.nickName }}</span>
            </div>
            <div >
              <span style="font-weight: bold">反馈时间:</span>
              <span style="margin-left: 8px">{{ props.row.time }}</span>
            </div>
            <div>
              <span style="font-weight: bold">反馈意见:</span>
              <span style="margin-left: 8px">{{ props.row.info }}</span>
            </div>
          </div>
        </template>
      </el-table-column>
<!--      <el-table-column
        sortable
        align="center"
        prop="id"
        label="主键"
      >
      </el-table-column>-->
      <el-table-column
        sortable
        align="center"
        prop="username"
        label="用户手机号"
      >
      </el-table-column>
      <el-table-column
        sortable
        align="center"
        prop="nickName"
        label="昵称"
      >
      </el-table-column>
<!--      <el-table-column
        align="center"
        prop="info"
        width="200"
        :show-overflow-tooltip="true"
        label="反馈意见"
      >
      </el-table-column>-->
      <el-table-column
        sortable
        align="center"
        prop="time"
        label="反馈时间"
      >
      </el-table-column>
      <!--      <el-table-column
              sortable
              align="center"
              prop="info"
              label="商品说明">
            </el-table-column>-->
      <!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
              <template slot-scope="scope">
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit"
                  @click="handleUpdate(scope.row)"
                  v-hasPermi="['system:post:edit']"
                >修改
                </el-button>
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-delete"
                  @click="handleDelete(scope.row)"
                  v-hasPermi="['system:post:remove']"
                >删除
                </el-button>
              </template>
            </el-table-column>-->
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

  </div>
</template>

<script>

import { listMiniFankui } from '@/api/mini/fankui'
import config from '@/utils/config'

export default {
  name: 'MiniGood',
  data() {
    return {
      imgPrex: config.imgPrefx,
      loading: true,
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      total: 0,
      tableData: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        username:'',
        nickName: ''
      }
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList() {
      this.loading = true
      this.resetForm()
      listMiniFankui(this.queryParams).then(response => {
        this.tableData = response.rows
        this.total = response.total
        this.loading = false
      })
    },
    cancel() {
      this.open = false
      this.resetForm()
    },
    resetForm() {
      this.form = {}
    },
    handleQuery() {
      this.queryParams.pageNum = 1
      this.getList()
    }
  }
}
</script>
<style scoped>
.info_area{
  border: solid 1px green;
  height: 50px;
  line-height: 50px;
}
</style>
